// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import 'iview/dist/styles/iview.css'
import Vue from 'vue'
import App from './App'
import router from './router'
import '@/css/public.css'

// 引入iview框架
// import iview  from '@/iview/index' // 用于按需引入组件
import iview from 'iview'
Vue.use(iview)

// 引入axios库
import axios from 'axios'
import VueAxios from 'vue-axios'
axios.defaults.withCredentials = true
Vue.use(VueAxios, axios)

// 引用公用库
import util from '@/js/util' // 公共js库
Vue.prototype.$util = util;
// 引用字段type类型定义
import fieldType from '@/js/fieldType'
Vue.prototype.$fieldType = fieldType;

// 引用loading组件
import loading from '@/components/loading/index'
Vue.prototype.$loading = loading;

/*CKeditor 上传文章路径*/
Vue.prototype.uploadPicPath = process.env.API_ROOT + '/uploadImage.php?file=file';
Vue.prototype.CKeditorUploadPath = process.env.API_ROOT + '/uploadImage.php?file=upload';

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
